<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div id="app">
    <cpn><span slot="middle">改变中间</span></cpn>
    <cpn><button slot="left">改变左边</button></cpn>
</div>

<template id="cpn">
    <div>
        <h2>我是插槽</h2>
        <slot name="left"><span>左边</span></slot>
        <slot name="middle"><span>中间</span></slot>
        <slot name="right"><span>右边</span></slot>
    </div>
</template>
<script src="../js/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!'
        },
        components: {
            cpn: {
                template: '#cpn'
            }
        }
    })
</script>
</body>
</html>